import datetime
from itertools import count
import tkinter
import time
from operator import truediv

a = 12
b = 111
s = 'qqq'
#print(type(1))
#print(dir(1))
#print(len(s))
#print(id(b))
print(bool())

text = "hello world 6666666666666"
sub = "l"
count=text.count(sub)
print(sub,count)

format(sub)
print(text[3])
print(text[3:10:-1])
print(text[::-1])
print(id(text))
print(id(text[::-1]))

class number:
    def __init__(self,a,b):
        self.a=a
        self.b=b
    a = "123"
    b = "456"
print(number.a[::-1])

list_aaa = [1,2,3,4,5]
print(list_aaa.append(6))



def gettime():
    day = time.strftime("%Y:%m:%d %A ")
    timestr = time.strftime("%H:%M:%S")
    op.configure(text=day)
    lb.configure(text=timestr)
    root.after(1000, gettime)
root = tkinter.Tk()
root.title('实时电子时钟')
lb = tkinter.Label(root, text='', fg='blue', font=("黑体", 80))
op = tkinter.Label(root, text='', fg='red', font=("黑体", 80))


op.pack()
lb.pack()
gettime()
root.mainloop()


text = "auto school of witchcraft and wizardry"
def ti(text):
    r = " "
    a = true
    for i in text:
        if i == " ":
            r += i
            a = true
        elif a:
            r += i.upper()
            a = true
        else:
            r += i
            a = false
    return r
print(ti(text))
